package www.test.dao;

import java.sql.SQLException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import www.test.bean.UserInfo;
import www.test.utils.BeanListHandler;
import www.test.utils.jdbcUtils;

public class VerifyDao
{

	public static boolean verify(HttpServletRequest request, HttpServletResponse response, UserInfo user) throws SQLException
	{
		String sql ="select * from test where username =? and password=?";
		Object[] params ={user.getUsername(),user.getPassword()};
		int res =jdbcUtils.select(sql, params).size();
		if(res>0)
		{
			return true;
		}
		else 
	
		{
			return false;
		}
	}

}
